/* 基础样式 */
:root {
    --q1-color: #ff6b6b;
    --q1-light: #ffcece;
    --q1-dark: #c83232;
    --q2-color: #4ecdc4;
    --q2-light: #c4f1ee;
    --q2-dark: #2a9d8f;
    --q3-color: #ffd166;
    --q3-light: #fff3d6;
    --q3-dark: #e09f3e;
    --q4-color: #a5a58d;
    --q4-light: #e9e9e0;
    --q4-dark: #6b705c;
    --font-main: 'Nunito', sans-serif;
}

body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    background-color: #f9f9f9;
}

/* 页眉和页脚 */
header {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    text-align: center;
    padding: 15px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

header h1 {
    margin: 0;
    font-size: 24px;
    letter-spacing: 1px;
}

footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: #fff;
    text-align: center;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 100;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.footer-btn {
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-main);
    font-weight: bold;
    transition: all 0.3s ease;
    color: white;
}

#settingsBtn {
    background-color: #6a11cb;
}

#shareBtn {
    background-color: #25D366;
}

.footer-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* 容器布局 */
.container {
    display: flex;
    flex-wrap: wrap;
    height: calc(100% - 120px);
    padding-bottom: 60px;
    position: relative;
}

/* 象限样式 */
.quadrant {
    width: 50%;
    height: 50%;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

#quadrant1 {
    background-color: var(--q1-light);
    border-bottom: 0px solid var(--q1-color);
    border-left: 1px solid rgba(0,0,0,0.05);
}

#quadrant2 {
    background-color: var(--q2-light);
    border-bottom: 0px solid var(--q2-color);
    border-right: 1px solid rgba(0,0,0,0.05);
}

#quadrant3 {
    background-color: var(--q3-light);
    border-top: 0px solid var(--q3-color);
    border-left: 1px solid rgba(0,0,0,0.05);
}

#quadrant4 {
    background-color: var(--q4-light);
    border-top: 0px solid var(--q4-color);
    border-right: 1px solid rgba(0,0,0,0.05);
}


/* .quadrant:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    z-index: 10;
    border-radius: 15px;
    margin: 5px;
} */

/* 象限标题和描述 */
.quadrant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.quadrant h2 {
    font-size: 18px;
    margin: 0;
    color: #333;
}

#quadrant1 h2 {
    color: var(--q1-dark);
}

#quadrant2 h2 {
    color: var(--q2-dark);
}

#quadrant3 h2 {
    color: var(--q3-dark);
}

#quadrant4 h2 {
    color: var(--q4-dark);
}

.quadrant-description {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 15px;
    padding: 5px 10px;
    border-radius: 15px;
    display: inline-block;
}

#quadrant1 .quadrant-description {
    background-color: var(--q1-color);
    color: white;
}

#quadrant2 .quadrant-description {
    background-color: var(--q2-color);
    color: white;
}

#quadrant3 .quadrant-description {
    background-color: var(--q3-color);
    color: white;
}

#quadrant4 .quadrant-description {
    background-color: var(--q4-color);
    color: white;
}

/* 任务列表 */
ul {
    list-style-type: none;
    padding: 0;
    max-height: calc(100% - 120px);
    overflow-y: auto;
    margin-bottom: 10px;
    border-radius: 8px;
    overflow-x: hidden;
}

li {
    margin: 8px 0;
    cursor: pointer;
    padding: 10px 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    display: block;
}

#quadrant1 li {
    border-left: 4px solid var(--q1-color);
}

#quadrant2 li {
    border-left: 4px solid var(--q2-color);
}

#quadrant3 li {
    border-left: 4px solid var(--q3-color);
}

#quadrant4 li {
    border-left: 4px solid var(--q4-color);
}

li:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.task-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.delete-btn {
    color: #ccc;
    margin-left: 10px;
    cursor: pointer;
    font-size: 16px;
    transition: color 0.2s ease;
}

.delete-btn:hover {
    color: #ff6b6b;
}

.task-number {
    color: #999;
    margin-right: 8px;
    font-weight: bold;
}

.task-text {
    flex: 1;
    text-align: left;
}

/* 信息图标 */
.info-icon {
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
}

#quadrant1 .info-icon {
    color: var(--q1-dark);
}

#quadrant2 .info-icon {
    color: var(--q2-dark);
}

#quadrant3 .info-icon {
    color: var(--q3-dark);
}

#quadrant4 .info-icon {
    color: var(--q4-dark);
}

.info-icon:hover {
    transform: rotate(15deg) scale(1.2);
}

/* 输入容器 */
.input-container {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.input-container input {
    flex: 1;
    padding: 10px;
    border: 2px solid #eee;
    border-radius: 20px;
    font-family: var(--font-main);
    transition: all 0.3s ease;
}

#quadrant1 .input-container input:focus {
    border-color: var(--q1-color);
    outline: none;
}

#quadrant2 .input-container input:focus {
    border-color: var(--q2-color);
    outline: none;
}

#quadrant3 .input-container input:focus {
    border-color: var(--q3-color);
    outline: none;
}

#quadrant4 .input-container input:focus {
    border-color: var(--q4-color);
    outline: none;
}

.input-container button {
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    color: white;
    font-family: var(--font-main);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

#quadrant1 .input-container button {
    background-color: var(--q1-color);
}

#quadrant2 .input-container button {
    background-color: var(--q2-color);
}

#quadrant3 .input-container button {
    background-color: var(--q3-color);
}

#quadrant4 .input-container button {
    background-color: var(--q4-color);
}

.input-container button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 提示框 */
.tooltip {
    position: absolute;
    background-color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
    z-index: 1000;
    max-width: 400px;
    font-size: 14px;
    line-height: 1.6;
    animation: fadeIn 0.3s ease;
    min-width: 300px; /* 添加最小宽度，确保内容充分展示 */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 模态框 */
.modal {
    display: flex;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: auto;
    padding: 25px;
    border-radius: 15px;
    width: 80%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.import-export-buttons {
    text-align: center;
    margin: 20px 0;
}

.import-export-buttons button {
    padding: 12px 25px;
    margin: 0 10px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-family: var(--font-main);
    font-weight: bold;
    transition: all 0.3s ease;
}

.import-export-buttons button:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 15px rgba(0,0,0,0.2);
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .container {
        flex-direction: column;
        height: auto;
    }
    
    .quadrant {
        width: 100%;
        height: auto;
        min-height: auto;
        margin-bottom: 20px;
        border-radius: 15px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    
    #quadrant1, #quadrant2, #quadrant3, #quadrant4 {
        border: none;
    }
    
    #quadrant1 {
        border-left: 8px solid var(--q1-color);
    }
    
    #quadrant2 {
        border-left: 8px solid var(--q2-color);
    }
    
    #quadrant3 {
        border-left: 8px solid var(--q3-color);
    }
    
    #quadrant4 {
        border-left: 8px solid var(--q4-color);
    }
    
    ul {
        max-height: 200px;
    }
    
    .input-container {
        flex-direction: column;
    }
    
    .input-container button {
        margin-top: 10px;
        width: 100%;
    }
    
    .tooltip {
        max-width: 90%;
        left: 5% !important;
        right: 5% !important;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    header h1 {
        font-size: 20px;
    }
}
